#ifndef _DEVICE_SPI_H_
#define _DEVICE_SPI_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "driver/spi_master.h"

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"

#include "../system_Config.h"

void spi_init(u8 port,spi_host_device_t spi_host,spi_common_dma_t SPI_DMA,spi_device_handle_t *spi,u32 speed); //spi 初始化函数
void send_data(const uint8_t *data, int len,spi_device_handle_t spi); //spi发送函数
void spi_close(spi_device_handle_t spi,spi_host_device_t spi_host,spi_common_dma_t SPI_DMA); //释放总线

#endif